/*
 *  $Id: Hunger.cs 1051 2010-05-18 22:10:41Z thenn.erannor $
 *	This file is a part of Ragima CCG.
 *	(C) 2008 Ragima development group.
 *
 *	Licensed under the terms of the GNU GPL License version 2.
 *
 */

namespace Ragima.Cards001.Darkness.Spells {
    public class Hunger: SpellCard<Creature> {
        public Hunger(): base("001_d_s_hunger") {
            Level = CompleteLevel.ReadyForTest;
            Element = ElementType.Darkness;
            Value = 100;
            Target = new CreatureTarget(GetTargetPhrase(), true, false, CreatureTarget.IsNotSpirit);
            AddManaCost(ElementType.Darkness, 5);
        }

        protected override void DoAction(TargetArgs<Creature> args) {
            int health = args.Target.Health;
            if (health > 0) args.Player.IncrementMana(ElementType.Darkness, health);
            args.Target.InstantDeath();
        }
    }
}
